home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 76 / MF_UK_76_1.iso / Education Feature / MicroWorlds 2.03 Try Me / MicroWorlds 2.03 Try Me.rsrc / TEXT_562_done?.txt < prev    next >
Encoding:
Text File  |  1998-05-08  |  946 b   |  19 lines

  1. done? instruction-list
  2.  
  3. Reports true if the process indicated is completed. The process must have been launched using launch or forever. The input must be an exact copy of the instruction list that started the process. Done? can be used as an input to waituntil in order to synchronize events. See launch and forever. For other processes, such as melodies and movies, use the get primitive with on? as input. See get.
  4.  
  5. Example: 
  6.  
  7. Circle and square are procedures, and there are two turtles on the page. 
  8.  
  9. In the following procedure, t1 makes a circle at the same time t2 makes a square. It takes longer to draw a circle, but MicroWorlds will wait for both shapes to be finished before telling the turtles to go elsewhere on the page to draw more circles and squares.
  10.  
  11. to sq-circ
  12. t1, launch [circle]
  13. t2, launch [square]
  14. waituntil [done? [circle]]
  15. waituntil [done? [square]]
  16. t1, rt random 360 fd random 50
  17. t2, rt random 360 fd random 50
  18. sq-circ
  19. end